New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed onrequest path-related issue #292
Conversation
I am wondering what's the exact "issue" this patch is solving? |
Path can change in onrequest. |
@@ -449,10 +449,10 @@ request(Buffer, State=#state{socket=Socket, transport=Transport, | |||
-spec onrequest(cowboy_req:req(), #state{}, binary(), binary()) -> ok. | |||
onrequest(Req, State=#state{onrequest=undefined}, Host, Path) -> | |||
dispatch(Req, State, Host, Path); | |||
onrequest(Req, State=#state{onrequest=OnRequest}, Host, Path) -> | |||
onrequest(Req, State=#state{onrequest=OnRequest}, Host, _Path) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of not using it here can you remove this argument entirely? I'll merge when that's done. Thanks!
Just a small change and it's good! |
I am a little confused by your two comments above. Do you mean that you want me to remove the forth argument Path in the onrequest call entirely (which is a backward-compatibility issue), or that the change is good the way it is? |
Yes, remove, there's no backward there, it's an internal function. Just remove it on the caller too. |
ok, cool. |
Check it now. |
Merged, thanks! |
No description provided.